<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<c:set var="contextPath" value="${pageContext.request.contextPath}" />    

<!doctype html>
<html>
<body>
	<div id="top">
		<h1 id="logo">
			<a href="${contextPath}/index.do">
				<img src="${contextPath}/img/logo.jpg" alt="우리학교" />				
			</a>
		</h1> 
	
		<div id="topSearch">
			<input type="text" id="searchWord" name="searchWord" />
			<input type="submit" id="searchBt" name="searchBt" value="검색" /> 
		</div>
		 
		<ul id="topMenu">
			<li><a href="${contextPath}/index.do">홈</a></li>
			<c:choose>
				<c:when test="${sessionScope['loginId'] != null}">
					<li><a href="${contextPath}/logout.do">로그아웃</a></li>
					<li><a href="${contextPath}/modify.html">비밀번호 변경</a></li>
					<li><a href="${contextPath}/secession.html">회원탈퇴</a></li>
				</c:when>
				<c:otherwise>
					<li><a href="${contextPath}/login.do">로그인</a></li>
					<li><a href="${contextPath}/join.do">회원가입</a></li>
				</c:otherwise>
			</c:choose>
		</ul>
	</div>
	
</body>
</html>  